Skip to content

Fix resource files not being installed with pip/uv#93

Open
are-ces wants to merge 1 commit intomainfrom
fix-resource-packaging
Open

Fix resource files not being installed with pip/uv#93
are-ces wants to merge 1 commit intomainfrom
fix-resource-packaging

Conversation

@are-ces
Copy link
Copy Markdown
Contributor

@are-ces are-ces commented Apr 1, 2026

Description

This PR fixes a packaging issue where resource YAML files were not installed when using pip install or uv add. The files were only in the source tarball, not the wheel distribution.

Changes:

  • Moved resources/ into lightspeed_stack_providers/ package
  • Added init.py files to make resources a proper Python package
  • Updated pyproject.toml with explicit package-data configuration
  • Updated MANIFEST.in, run.yaml, and docker-compose.yml paths

Type of change

  • Bug fix
  • Configuration Update

Tools used to create PR

  • Assisted-by: Claude Sonnet 4.5
  • Generated by: N/A

Related Tickets & Documents

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Built package and verified all 6 YAML files are in the wheel: python3 -m zipfile -l dist/*.whl | grep yaml
  • Installed in clean venv and verified files in site-packages
  • Verified no unintended files (run.yaml, .env) are included

@are-ces are-ces force-pushed the fix-resource-packaging branch from 570dcd6 to 7548ad5 Compare April 1, 2026 08:47
## Problem
When installing via `pip install` or `uv add`, the resources folder was not
being installed to site-packages. The YAML files were only included in the
source tarball but not in the wheel distribution.

## Solution
- Moved resources/ into lightspeed_stack_providers/ package
- Added __init__.py files to make resources a proper Python package
- Updated package-data configuration with explicit file listing (no wildcards)
- Updated MANIFEST.in to reflect new location
- Updated run.yaml and docker-compose.yml paths

## Security
This approach is defensive:
- Explicitly lists only the 6 required YAML files
- No wildcards that could accidentally include sensitive files
- Standard Python package structure using importlib.resources

## Testing
Verified that:
- All 6 YAML files are in the wheel
- Files install correctly to site-packages
- No unintended files (run.yaml, .env, etc.) are included

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@are-ces are-ces force-pushed the fix-resource-packaging branch from 7548ad5 to d80ad1b Compare April 1, 2026 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant